package com.liufh.feign;

import com.liufh.common.ResultData;
import org.springframework.stereotype.Component;

/**
 * @author: liufh
 * @create: 2022-01-25 17:53
 *
 * 降级回退逻辑需要定义一个类，实现FeignClient接口，实现接口中的方法
 */
@Component
public class CodeFallback implements CodeServiceFeignClient {

    @Override
    public ResultData validate(String email, String code) {
        ResultData resultData = new ResultData();
        resultData.setCode("999");
        return resultData;
    }

}
